import React, { PureComponent } from 'react'
import { StyleSheet, ActivityIndicator, View, Text } from 'react-native';

export default class PostActivityIndicator extends PureComponent {

    render() {
        if (this.props.animating) {
            return (<ActivityIndicator animating={this.props.animating} style={styles.container} />
            )
        }
        else {
            return null;
        }
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        backgroundColor: '#fff',
        opacity: 0.5,
        zIndex: 2,
        position: 'absolute',
        width: '100%',
        height: '100%'
    }
})

